<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>粉丝信息录入</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f9;
            color: #333;
            margin: 0;
            padding: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
        }

        h2 {
            color: #28a745;
            margin-bottom: 20px;
        }

        form {
            background-color: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 400px;
        }

        label {
            font-weight: bold;
            color: #555;
            display: block;
            margin-bottom: 8px;
        }

        input[type="text"] {
            width: 100%;
            padding: 10px;
            margin-bottom: 16px;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-sizing: border-box;
            font-size: 14px;
        }

        button[type="submit"] {
            width: 100%;
            padding: 10px;
            background-color: #28a745;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
        }

        button[type="submit"]:hover {
            background-color: #218838;
        }

        ul {
            list-style-type: none;
            padding: 0;
            margin-bottom: 20px;
        }

        ul li {
            padding: 10px;
            border-radius: 4px;
            margin-bottom: 10px;
            text-align: center;
        }

        .success {
            background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }

        .error {
            background-color: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }

        .warning {
            background-color: #fff3cd;
            color: #856404;
            border: 1px solid #ffeeba;
        }

        .info {
            background-color: #d1ecf1;
            color: #0c5460;
            border: 1px solid #bee5eb;
        }
    </style>

</head>
<body>
<h2>填写粉丝基本信息</h2>

<!-- 显示 flash 消息 -->
{% with messages = get_flashed_messages(with_categories=true) %}
{% if not messages %}
<ul>
    {% for category, message in messages %}
    <li class="{{ category }}">{{ message }}</li>
    {% endfor %}
</ul>
{% endif %}
{% endwith %}

<form method="POST" action="{{ url_for('datain') }}" >
    <label for="fan_id">id:</label><br>
    <input type="text" id="fan_id" name="fan_id" required><br><br>

    <label for="fan_name">姓名:</label><br>
    <input type="text" id="fan_name" name="fan_name" required><br><br>

    <label for="fan_age">年龄:</label><br>
    <input type="text" id="fan_age" name="fan_age" required><br><br>

    <label for="fan_gender">性别:</label><br>
    <input type="text" id="fan_gender" name="fan_gender" required><br><br>

    <label for="fan_occupy">职业:</label><br>
    <input type="text" id="fan_occupy" name="fan_occupy" required><br><br>

    <label for="fan_edu">教育程度:</label><br>
    <input type="text" id="fan_edu" name="fan_edu" required><br><br>

    <button type="submit">提交</button>
</form>

</body>
</html>
